package com.commons.service.service.impl;

import com.baomidou.mybatisplus.core.toolkit.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.*;
import com.baomidou.mybatisplus.extension.service.impl.*;
import com.commons.service.dto.*;
import com.commons.service.entity.*;
import com.commons.service.mapper.*;
import com.commons.service.service.*;
import com.commons.tools.utils.*;
import org.springframework.stereotype.*;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author robot
 * @since 2022-12-29
 */
@Service
public class ApplicationServiceImpl extends ServiceImpl<ApplicationMapper, Application> implements ApplicationService {

    @Override
    public Result<Page<Application>> pageAppList(@RequestBody PageDto dto) {

        Page<Application> pageApps = this.page(new Page<>(dto.getPageNum(), dto.getPageSize()), Wrappers.<Application>lambdaQuery().orderByDesc(Application::getId));
        return Result.ok(pageApps);
    }
}
